package com.csj.cloud.front.controller;

import com.csj.cloud.common.entity.User;
import com.csj.cloud.common.vo.ResultBean;
import com.csj.cloud.core.service.user.UserService;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:ChengshaoJie
 * @Description:
 * @Date:Created in 下午 5:51 2019/11/18 0018
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Reference
    private UserService userService;

    @ResponseBody
    @RequestMapping("/reg")
    public ResultBean reg(User u) {
        ResultBean resultBean = new ResultBean();
        resultBean = userService.reg(u);
        return resultBean;
    }

}
